import service from "../utils/service.js";
import type {IOper} from "../MyTs/index.js"

//登录
export const loginApi = (data: IOper) => service.post("admin/admin/login", data);

//获取管理员列表

export const GetManageList = () => service.get("admin/admin/list");

//添加管理员

export const AddManage = (data: IOper) => service.post("admin/admin/add", data);


//删除管理员

export const deleteOperAPI = (adminid:string) =>service.post("admin/admin/delete",{adminid:adminid})
//修改管理员

export const editOperatorApi = (data: IOper) => service.post("admin/admin/update", data)

//获取管理员详情

export const getOperDataAPI = (adminname:string) =>service.get("admin/admin/detail",{params:{adminname}})